
package Animation;

import javax.media.opengl.GL;

/**
 *
 * @author Kevin Tracy
 */
public class Grid {

    public Grid()
    {

    }

    /*
     * Method to draw a 22x22 grid (and borders) around the game board.
     */
    public void drawGrid(GL gl)
    {
        int xCount = 0;
        int yCount = 0;
        int xPos = 20;
        int yPos = 20;
        while(xCount <= 22)
        {
            gl.glBegin(GL.GL_LINES) ;
            gl.glColor3f(0.0f, 0.0f, 0.0f);
                
                gl.glVertex3d(xPos, 20, 0);
                gl.glVertex3d(xPos, 680, 0);

           xCount++;
           xPos += 30;
           gl.glEnd();
        }

        while(yCount <= 22)
        {
            gl.glBegin(GL.GL_LINES) ;
            gl.glColor3f(0.0f, 0.0f, 0.0f);          
                gl.glVertex3d(20, yPos, 0);
                gl.glVertex3d(680, yPos, 0);
            yCount++;
            yPos += 30;
            gl.glEnd();
        }   
    }


}